<script>

import BlogDetailComponent from '@/components/BlogDetailComponent.vue'

export default {
  name: 'BlogDetail',
  components: { BlogDetailComponent },
  data () {
    return {
      blog: {},
      show: false
    }
  },
  methods: {
    init (blogId) {
      this.$axios.get('blog/info/' + blogId).then(data => {
        this.blog = { ...data }
      })
      this.show = true
    }
  }
}
</script>

<template>
<el-dialog title="博客预览" :visible.sync="show">
  <blog-detail-component :blog="blog"/>
</el-dialog>
</template>

<style scoped lang="scss">

</style>
